{extend name="base"/}
{block name="head"}
<style>
    .msg{
        font-weight: bold;
        margin-left: 20px;
        font-size: 14px;
    }
    .error-msg{
        color: #cb2a39;
    }
    .success-msg{
        color: #28a745;
    }
</style>

{/block}
{block name="main"}
<div class="my-3 p-3 bg-white rounded shadow-sm" style="width: 100%;overflow:auto;">
    <form method="post" action="">
        <div class="form-group">
            <label for="nickname">昵称</label>
            <input type="text" class="form-control" id="nickname" value="{$user.nickname|default=''}" name="nickname" placeholder="">
            <small class="form-text text-muted"></small>
        </div>
        <div class="form-group">
            <label for="host">邮箱</label>
            <input type="email" class="form-control" id="host" value="{$user.email|default=''}" name="email" placeholder="">
            <small class="form-text text-muted"></small>
        </div>
        <div class="form-group">
            <label for="password">登录密码</label>
            <input type="password" class="form-control" id="password" value="" name="password" placeholder="不修改请留空">
            <small class="form-text text-muted"></small>
        </div>

        <button type="submit" class="btn btn-primary">保存</button>
        {if condition="$error == 1"}
        <small class="error-msg msg">邮箱已被占用</small>
        {/if}
        {if condition="$error === 'ok'"}
        <small class="success-msg msg">资料修改成功</small>
        {/if}

    </form>
</div>
{/block}
